<template>
  <el-drawer
    v-model:visible="options.visible"
    :contentWrapperStyle="options.contentWrapperStyle || ''"
    :drawerStyle="options.drawerStyle || ''"
    :title="options.title"
    :placement="options.placement || 'right'"
    :closable="'closable' in options ? options.closable : true"
    :width="options.width || 1000"
    centered
    :footer="null"
    :destroyOnClose="options.destroyOnClose || false"
    @cancel="handleCancel"
  >
    <div>
      <slot />
    </div>
  </el-drawer>
</template>

<script setup>
import { reactive } from 'vue'

const options = reactive({
  visible: false,
  loading: false,
  width: '100%',
  title: '',
  placement: 'right',
})
defineExpose({ options })
</script>

<style lang="scss" scoped></style>
